#!/bin/sh -e

APPEND=no
#echo $#
#echo $@
#echo $*

while [ $# -gt 0 ]; do
	case "$1" in
		--) shift; echo $#; break;; #break lead to exit while []
		-a) shift; echo $#; APPEND=yes;;
		 *)  shift;echo $#; break;; #break lead to exit while []

	esac
#	echo $#;
done

	echo $#;
